//
//  PayTicketPayTypeTableCell.m
//  didacar
//
//  Created by 度周末网络-王腾 on 15/12/23.
//  Copyright © 2015年 dzmmac. All rights reserved.
//

#import "PayTicketPayTypeTableCell.h"
#import "UIScreen+Frame.h"
@implementation PayTicketPayTypeTableCell

- (void)awakeFromNib {
    [self.contentView addSubview:[CommoneTools createLineWithFrame:CGRectMake(15, 43.5, [UIScreen width]-15, 0.45)]];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}


-(void)selectedPayType:(NSInteger)selectedPayType{
    if (self.indexPath.row == selectedPayType) {
        self.selectedImg.image = [UIImage imageNamed:@"icon_pay_selected"];
    }else{
        self.selectedImg.image = [UIImage imageNamed:@"icon_pay_unselected"];
    }
}

-(void)setIndexPath:(NSIndexPath *)indexPath{
    _indexPath = indexPath;
    
    if (indexPath.row == 0) {
        self.img.image = [UIImage imageNamed:@"icon_pay_alipay"];
        self.text.text = @"支付宝支付";
    }else if (indexPath.row == 1){
        self.img.image = [UIImage imageNamed:@"icon_pay_weixinpay"];
        self.text.text = @"微信支付";
    }
}

@end
